﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chinaer.Dao
{
    public class EmployeeDAO:Repository,IDao.IEmployeeDAO
    {
        IDao.IEmployeeDAO employeeDAO = new Dao.EF.EmployeeDAO();
        public List<Model.Entities.Model_Employee> GetAllEmployeesByDianPuID(string dianPuID)
        {
            return employeeDAO.GetAllEmployeesByDianPuID(dianPuID);
        }

        public bool EnableTrack
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public IList<Model.Entities.Model_Employee> Query(string sql, int pageIndex, out int recordCount, int pageSize, params System.Data.SqlClient.SqlParameter[] sqlParams)
        {
            return employeeDAO.Query(sql, pageIndex, out recordCount, pageSize, sqlParams);
        }

        public Model.Entities.Model_Employee GetByID(string id)
        {
            return employeeDAO.GetByID(id);
        }

        public bool Exists(string id)
        {
            return employeeDAO.Exists(id);
        }

        public bool Add(Model.Entities.Model_Employee entity)
        {
            return employeeDAO.Add(entity);
        }

        public bool Update(Model.Entities.Model_Employee entity)
        {
            return employeeDAO.Update(entity);
        }

        public bool Delete(Model.Entities.Model_Employee entity)
        {
            return employeeDAO.Delete(entity);
        }

        public bool Delete(string id)
        {
            return employeeDAO.Delete(id);
        }

        public int DeleteByIDs(IList<string> listID)
        {
            return employeeDAO.DeleteByIDs(listID);
        }


        public Model.Entities.Model_Employee GetByName(string employeeName)
        {
            return employeeDAO.GetByName(employeeName);
        }


        public Model.Entities.Model_Employee GetByNameAndPassword(string name, string password)
        {
            return employeeDAO.GetByNameAndPassword(name, password);
        }


    }
}
